package cn.dfun.demo.scdemo.order.controller;

import cn.dfun.demo.scdemo.common.entity.CommonResult;
import cn.dfun.demo.scdemo.order.service.PaymentFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@Slf4j
public class OrderController {
    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping("/consumer/payment/get/{id}")
    public CommonResult getPayment(@PathVariable Long id) {
        return paymentFeignService.getById(id);
    }

    @GetMapping(value="/consumer/payment/timeout")
    public String timeout() {
        return paymentFeignService.timeout();
    }
}
